a=input("请输入一串字符串")
dict = {'letter':0,'number':0,'whitespace':0,'other':0}
for i in a:
    if i>='a' and i<='z' or i>='A' and i<='Z':
        dict["letter"]+=1
    elif i in '0123456789':
        dict["number"]+=1
    elif i==' ':
        dict["whitespace"]+=1
    else:
        dict["other"]+=1
print(dict)
